package gui.Principal;

import java.awt.SystemColor;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JPanel;
import javax.swing.border.TitledBorder;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JTextField;

import System.MainControl;

import java.awt.Font;

public class SystemInfo extends JPanel implements ActionListener{

	/**
	 * 
	 */
	private static final long serialVersionUID = -5524185038342159335L;
	private JTextField txtChooseSubject;
	private JButton btnNewButton_1;

	/**
	 * Create the panel.
	 */
	public SystemInfo() {
		super();
		setBackground(SystemColor.activeCaption);
		setLayout(null);
		
		JButton btnNewButton = new JButton("Review Question");
		btnNewButton.setFont(new Font("Microsoft New Tai Lue", Font.BOLD, 13));
		btnNewButton.setBounds(124, 103, 153, 35);
		add(btnNewButton);
		
		JButton btnReviewExams = new JButton("Review Exams");
		btnReviewExams.setFont(new Font("Microsoft New Tai Lue", Font.BOLD, 13));
		btnReviewExams.setBounds(124, 158, 153, 35);
		add(btnReviewExams);
		
		JComboBox comboBox = new JComboBox();
		comboBox.setBounds(58, 72, 121, 20);
		add(comboBox);
		
		txtChooseSubject = new JTextField();
		txtChooseSubject.setFont(new Font("Microsoft New Tai Lue", Font.BOLD, 13));
		txtChooseSubject.setEditable(false);
		txtChooseSubject.setText("Choose Subject:");
		txtChooseSubject.setBounds(25, 40, 114, 20);
		add(txtChooseSubject);
		txtChooseSubject.setColumns(10);
		
		JButton btnReviewGrades = new JButton("Review Grades");
		btnReviewGrades.setFont(new Font("Microsoft New Tai Lue", Font.BOLD, 13));
		btnReviewGrades.setBounds(124, 220, 153, 35);
		add(btnReviewGrades);
		
		btnNewButton_1 = new JButton("Back");
		btnNewButton_1.setFont(new Font("Microsoft New Tai Lue", Font.BOLD, 13));
		btnNewButton_1.addActionListener(this);
		btnNewButton_1.setBounds(293, 272, 89, 23);
		add(btnNewButton_1);
		initialize();

	}

	private void initialize() {
		setBorder(new TitledBorder(null, "System Information", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		setBackground(SystemColor.activeCaption);
		setBounds(100, 100, 622, 350);
	}
		
		@Override			
		public void actionPerformed(ActionEvent e) 
		{
			if(e.getSource()==btnNewButton_1)
				MainControl.setGUI(MainControl.currentUser.getRole(), this);
		}
}
